package loveqq.niceexcel.read.handler;

import loveqq.niceexcel.read.ReadContext;
import org.apache.poi.ss.usermodel.Row;

/**
 * 读取监听器
 * <pre>{@code
 *
 *  RowReadHandler handler;
 *  for (Row row : sheet) {
 *      // 读取row开始
 *      handler.onRowBegin();
 *      for (Cell cell : row) {
 *          ......
 *      }
 *      // 读取row结束
 *      handler.onRowEnd();
 *  }
 *
 * }</pre>
 *
 * @author zhongjh@tsintergy.com
 * @date 2022-08-18
 */
public interface RowReadHandler extends ReadHandler {
    /**
     * 单个row获取后开始读取
     */
    default void onRowBegin(ReadContext context, Row row) {
    }

    /**
     * 单个row读取结束后
     */
    default void onRowEnd(ReadContext context, Row row) {
    }
}
